import { QuestionCircleOutlined } from '@ant-design/icons';
import { Tooltip } from 'antd';

/*
 * @Author: 江舟 jijiangzhou@recycloud.cn
 * @Date: 2024-03-22 14:54:05
 * @LastEditors: 江舟 jijiangzhou@recycloud.cn
 * @LastEditTime: 2024-05-14 11:04:53
 * @FilePath: \vite-project\src\components\common\CommonTitle.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export default (props: { title?: string; children?: any; className?: string; tooltip?: string }) => {
	return (
		<div className="flex justify-between items-center mb-12px" {...props}>
			<div className="font-bold flex items-center">
				<div className="w-3px h-16px bg-primary mr-4px"></div>
				<div>{props.title}</div>
				{props.tooltip && (
					<div className="ml-4px">
						<Tooltip title={props.tooltip}>
							<QuestionCircleOutlined />
						</Tooltip>
					</div>
				)}
			</div>
			{props.children}
		</div>
	);
};
